package com.ktgj.customer.mapper;

import java.math.BigDecimal;
import java.util.List;
import com.ktgj.customer.domain.DepositBusiness;
import com.ktgj.customer.domain.vo.GoldListVo;

/**
 * 预留款业务
Mapper接口
 * 
 * @author ruoyi
 * @date 2021-07-27
 */
public interface DepositBusinessMapper 
{
    /**
     * 查询预留款业务

     * 
     * @param businessId 预留款业务
ID
     * @return 预留款业务

     */
    public DepositBusiness selectDepositBusinessById(Long businessId);

    /**
     * 查询预留款业务
列表
     * 
     * @param depositBusiness 预留款业务

     * @return 预留款业务
集合
     */
    public List<DepositBusiness> selectDepositBusinessList(DepositBusiness depositBusiness);

    /**
     * 新增预留款业务

     * 
     * @param depositBusiness 预留款业务

     * @return 结果
     */
    public int insertDepositBusiness(DepositBusiness depositBusiness);

    /**
     * 修改预留款业务

     * 
     * @param depositBusiness 预留款业务

     * @return 结果
     */
    public int updateDepositBusiness(DepositBusiness depositBusiness);


    /**
     * 删除预留款业务

     * 
     * @param businessId 预留款业务
ID
     * @return 结果
     */
    public int deleteDepositBusinessById(Long businessId);

    /**
     * 批量删除预留款业务

     * 
     * @param businessIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteDepositBusinessByIds(Long[] businessIds);

    public BigDecimal queyUserDepositBusiness(Long customerId);

    /**
     * 我的资产（查询）
     * */
    public List<DepositBusiness> selectDepositBusinessByCustomerId(Long customerId);

    /**
     * 预留款统计
     * */
    public List<DepositBusiness> depositBusinessByCustomerId(Long customerId);

    /**
     * 预留款审核
     * */
    public List<DepositBusiness> businessByCustomerId(Long customerId);

    /**
     * 我的资产（更新）
     * */
    public int updateDepositBusinessByCustomerId(DepositBusiness depositBusiness);

    //修改会员所有的预留款余额
    int updateDepositByCustomerId(DepositBusiness depositBusiness);

    /**
     * 查询用户可用预留款
     * @param customerId
     * @return
     */
    public List<BigDecimal> queryUseDepositBusiness(Long customerId);

    public BigDecimal queryDepositBusiness(Long customerId);
    //可提现预留款
    public BigDecimal queryExtractDepositBusiness(Long customerId);
    //不可提现预留款
    public BigDecimal queryNoExtractDepositBusiness(Long customerId);
    //冻结预留款
    public BigDecimal queryFrozenDepositBusiness(Long customerId);

    public List<DepositBusiness> queryUsableDepositBusinessList(Long customerId);

    public void updateAmountEqualZero(List<Long> ids);

    /**
     * 预留款列表
     * */
    public List<DepositBusiness> goldList(GoldListVo goldListVo);

    /**
     * 当前会员所有预留款记录
     * */
    public List<DepositBusiness> dominateGold(Long id);

    /**
     * 订单号查预留款记录
     * */
    public List<DepositBusiness> audit(String orderNum);
}
